<template>
    <creditscom :goodsDetail="goodsDetail"></creditscom>
</template>

<script>
import creditscom from '@/components/creditsCom'
import {mapState,mapActions} from 'vuex'
export default {
    components: {
        creditscom
    },
    created(){
        this.goodsId = this.$route.query.goodsId;
        if(this.goodsId){
            this.getGoodsDetail({goodsId:this.goodsId});
        } 
    },
    data(){
        return {
            goodsId : null
        }
    },
    computed:{
        ...mapState({
            goodsDetail:state => state.personModules.goodsDetail
        })
    },
    methods:{
        ...mapActions({
            getGoodsDetail:'personModules/getGoodsDetail'
        })
    }
}
</script>

<style lang="scss" scoped>
    @import "../../assets/style/order.scss";
</style>
